<%@ Register TagPrefix="dammela" Namespace="whole" Assembly = "dammela"%>
<%@ Page Language="C#" Description="Homepage" debug="false" Culture="it-IT" trace="false" EnableViewState="false"%>

<html>
<head>
<LINK type="text/css" rel="stylesheet" href="/main.css">
<meta http-equiv="Content-Type" Content="text/html; charset=ISO-8859-1">
<title id="title" runat=server></title>
<dammela:scripts ID="Scripts1" runat="server"/></head>
<body  class="body" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" id="body" runat="server">

<div class="Pbox" width="100%">
<dammela:menuBanner runat="server"/>
</div>
<table class="body" border="0" cellspacing="10" cellpadding="0" width="100%">
<tr><td valign="top" width="150px">

<table class="Pbox" cellpadding="0" width="150px">
<tr><td valign="top">
<dammela:login ID="Login1" 
    xml="/login/login.xml"
    xsl="/login/login.xsl"
    kind="FREAKMEUP"
    runat="server"/>
</td></tr>
<tr><td height="10px"></td></tr>
<tr><td><dammela:cerca look="HOME" runat=server/></td></tr>
</table>

</td>
<td valign="top" width="100%">

<dammela:shopping product="EMAIL" type="BOUGHT" runat=server/>

<%
NameValueCollection getColl	=	Request.QueryString;

if( getColl.Get("NUMORD") != null )
	Response.Write( "NUMORD:"+getColl.Get("NUMORD"));
Response.Write( "<br/>");
if( getColl.Get("IDNEGOZIO") != null )
	Response.Write( "IDNEGOZIO:"+getColl.Get("IDNEGOZIO"));
Response.Write( "<br/>");
if( getColl.Get("AUT") != null )
	Response.Write( "AUT:"+getColl.Get("AUT"));
Response.Write( "<br/>");
if( getColl.Get("IMPORTO") != null )
	Response.Write( "IMPORTO:"+getColl.Get("IMPORTO"));
Response.Write( "<br/>");
if( getColl.Get("VALUTA") != null )
	Response.Write( "VALUTA:"+getColl.Get("VALUTA"));
Response.Write( "<br/>");
if( getColl.Get("IDTRANS") != null )
	Response.Write( "IDTRANS:"+getColl.Get("IDTRANS"));
Response.Write( "<br/>");
if( getColl.Get("TCONTAB") != null )
	Response.Write( "TCONTAB:"+getColl.Get("TCONTAB"));
Response.Write( "<br/>");
if( getColl.Get("TAUTOR") != null )
	Response.Write( "TAUTOR:"+getColl.Get("TAUTOR"));
Response.Write( "<br/>");
if( getColl.Get("ESITO") != null )
	Response.Write( "ESITO:"+getColl.Get("ESITO"));
Response.Write( "<br/>");

Response.Write( "SECRET KEY:EAAYYXC3LcEj8D3uq7kREiAE9vxgFaCbpSLZqjAzA8Dx7iJrVP");

Response.Write( "<br/>");
if( getColl.Get("MAC") != null )
	Response.Write( "<b>MAC:"+getColl.Get("MAC")+"</b>");
Response.Write( "<p/>");

string str2enc = "NUMORD=" + getColl.Get("NUMORD") 
		+ "&IDNEGOZIO=" + getColl.Get("IDNEGOZIO")
		+ "&AUT=" + getColl.Get("AUT")
		+ "&IMPORTO=" + getColl.Get("IMPORTO")
		+ "&VALUTA=" + getColl.Get("VALUTA")
		+ "&IDTRANS=" + getColl.Get("IDTRANS")
		+ "&TCONTAB=" + getColl.Get("TCONTAB")
		+ "&TAUTOR=" + getColl.Get("TAUTOR")
		+ "&ESITO=" + getColl.Get("ESITO")
		+ "&EAAYYXC3LcEj8D3uq7kREiAE9vxgFaCbpSLZqjAzA8Dx7iJrVP";
				
byte[] b = System.Text.Encoding.UTF8.GetBytes( str2enc );

Response.Write( "<p/>");
Response.Write( "string2hash:" + str2enc );
Response.Write( "<p/>");

System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();

byte[] hash;

hash = md5.ComputeHash(b);

StringBuilder hashedString = new StringBuilder();

foreach (byte v in hash)
	hashedString.Append(v.ToString("x2"));

Response.Write( "<p/>");
Response.Write( "hashedString:" + hashedString.ToString().ToUpper() );
Response.Write( "<p/>");

%>
</td>
<td valign="top">

<div style="width:140px;">
<asp:AdRotator id="ActAdRot01" runat="server" Target="_self" BorderStyle="Solid" BorderWidth="0" BorderColor="Black" AdvertisementFile="/ActAds.xml"/>
</div>

</td>
</tr>

</table>
<div style="width:100%;">
<dammela:footer runat="server"/>
</div>
<span id="errorStr" runat=server/>

</body>
</html>